import Activity from '@/pages/activity/index.vue';
import ActivityEdit from '@/pages/activityEdit/index.vue';
import ActivityEnter from '@/pages/activityEnter/index.vue';
import Company from '@/pages/company/index.vue';
import CompanyEdit from '@/pages/companyEdit/index.vue';
import News from '@/pages/news/index.vue';
import NewsEdit from '@/pages/newsEdit/index.vue';

export default {
  path: '/space',
  name: 'space',
  meta: {
    title: '企业空间',
    icon: 'MailOutlined',
    hidden: true,
    moduleName: 'login',
  },
  children: [
    {
      name: 'cms',
      path: '/cms',
      meta: {
        title: 'CMS管理',
        icon: 'LayoutOutlined',
      },
      children: [
        {
          name: 'banner',
          path: '/banner',
          meta: {
            title: '轮播图',
          },
          children: [
            {
              name: 'bannerList',
              path: '/list',
              meta: {
                title: '轮播图列表',
              },
              component: () => import('@/pages/cms/banner/list.vue'),
              children: [
                {
                  name: 'bannerEdit',
                  path: '/edit',
                  meta: {
                    title: '编辑轮播图',
                    hidden: true,
                  },
                  component: () =>
                    import('@/pages/cms/banner/create/index.vue'),
                },
                {
                  name: 'bannerdetail',
                  path: '/detail',
                  meta: {
                    title: '查看轮播图',
                    hidden: true,
                  },
                  component: () =>
                    import('@/pages/cms/banner/create/index.vue'),
                },
              ],
            },
            {
              name: 'bannerAdd',
              path: '/add',
              meta: {
                title: '新增轮播图',
              },
              component: () => import('@/pages/cms/banner/create/index.vue'),
            },
          ],
        },
        {
          name: 'plugin',
          path: '/plugin',
          meta: {
            title: '组件管理',
          },
          children: [
            {
              name: 'pluginList',
              path: '/list',
              meta: {
                title: '组件列表',
              },
              component: () => import('@/pages/cms/plugin/list.vue'),
              children: [
                {
                  name: 'plugineditimage',
                  path: '/edit/image',
                  meta: {
                    title: '编辑组件-图片',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'plugineditvideo',
                  path: '/edit/video',
                  meta: {
                    title: '编辑组件-视频',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'pluginedittext',
                  path: '/edit/text',
                  meta: {
                    title: '编辑组件-文本',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'plugineditpopup',
                  path: '/edit/popup',
                  meta: {
                    title: '编辑组件-弹窗',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'plugindetailimage',
                  path: '/detail/image',
                  meta: {
                    title: '查看组件-图片',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'plugindetailvideo',
                  path: '/detail/video',
                  meta: {
                    title: '查看组件-视频',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'plugindetailtext',
                  path: '/detail/text',
                  meta: {
                    title: '查看组件-文本',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
                {
                  name: 'plugindetailpopup',
                  path: '/detail/popup',
                  meta: {
                    title: '查看组件-弹窗',
                    hidden: true,
                  },
                  component: () => import('@/pages/cms/plugin/create.vue'),
                },
              ],
            },
            {
              name: 'pluginaddimage',
              path: '/add/image',
              meta: {
                title: '新增组件-图片',
              },
              component: () => import('@/pages/cms/plugin/create.vue'),
            },
            {
              name: 'pluginaddvideo',
              path: '/add/video',
              meta: {
                title: '新增组件-视频',
              },
              component: () => import('@/pages/cms/plugin/create.vue'),
            },
            {
              name: 'pluginaddtext',
              path: '/add/text',
              meta: {
                title: '新增组件-文本',
              },
              component: () => import('@/pages/cms/plugin/create.vue'),
            },
            {
              name: 'pluginaddpopup',
              path: '/add/popup',
              meta: {
                title: '新增组件-弹窗',
              },
              component: () => import('@/pages/cms/plugin/create.vue'),
            },
          ],
        },
        {
          name: 'category',
          path: '/category',
          meta: {
            title: '栏目页',
          },
          children: [
            {
              name: 'categoryList',
              path: '/list',
              meta: {
                title: '栏目页列表',
              },
              component: () => import('@/pages/cms/category/list.vue'),
              children: [
                {
                  name: 'categoryEdit',
                  path: '/edit',
                  meta: {
                    title: '编辑栏目页',
                    hidden: true,
                  },
                  component: () =>
                    import('@/pages/cms/category/create/index.vue'),
                },
                {
                  name: 'categorydetail',
                  path: '/detail',
                  meta: {
                    title: '查看栏目页',
                    hidden: true,
                  },
                  component: () =>
                    import('@/pages/cms/category/create/index.vue'),
                },
              ],
            },
            {
              name: 'categoryAdd',
              path: '/add',
              meta: {
                title: '新增栏目页',
              },
              component: () => import('@/pages/cms/category/create/index.vue'),
            },
          ],
        },
      ],
    },
    {
      name: 'activity',
      meta: {
        title: '活动管理',
        icon: 'InteractionOutlined',
      },
      path: '/activity',
      // component: {
      //   template: () => null,
      // },
      children: [
        {
          name: 'activitylist',
          meta: {
            title: '列表',
          },
          path: '/list',
          component: Activity,
          children: [
            {
              name: 'activityedit',
              meta: {
                title: '编辑',
                hidden: true,
              },
              path: '/activityedit/:id',
              component: ActivityEdit,
            },
            {
              name: 'activitycreate',
              meta: {
                title: '创建',
                hidden: true,
              },
              path: '/activitycreate',
              component: ActivityEdit,
            },
            {
              name: 'activityenter',
              meta: {
                title: '报名信息',
                hidden: true,
              },
              path: '/activityenter/:id',
              component: ActivityEnter,
            },
          ],
        },
      ],
    },
    {
      name: 'company',
      meta: {
        title: '企业管理',
        icon: 'BlockOutlined',
      },
      path: '/company',
      component: Company,
      children: [
        {
          name: 'companycreate',
          meta: {
            title: '新增',
            hidden: true,
          },
          path: '/companycreate',
          component: CompanyEdit,
        },
        {
          name: 'companyedit',
          meta: {
            title: '编辑',
            hidden: true,
          },
          path: '/companyedit/:id',
          component: CompanyEdit,
        },
      ],
    },
    {
      name: 'news',
      meta: {
        title: '新闻管理',
        icon: 'CoffeeOutlined',
      },
      path: '/news',
      component: News,
      children: [
        {
          name: 'newscreate',
          meta: {
            title: '新增',
            hidden: true,
          },
          path: '/newscreate',
          component: NewsEdit,
        },
        {
          name: 'newsedit',
          meta: {
            title: '编辑',
            hidden: true,
          },
          path: '/newsedit/:id',
          component: NewsEdit,
        },
      ],
    },
    {
      name: 'aggyx',
      meta: {
        title: '福利优享汇',
        icon: 'InteractionOutlined',
      },
      path: '/aggyx',
      component: () => import('@/pages/aggyx/list.vue'),
      children: [
        {
          name: 'aggyxadd',
          path: '/add',
          meta: {
            title: '新增优享汇',
            hidden: true,
          },
          component: () => import('@/pages/aggyx/create.vue'),
        },
        {
          name: 'aggyxedit',
          path: '/edit',
          meta: {
            title: '编辑优享汇',
            hidden: true,
          },
          component: () => import('@/pages/aggyx/create.vue'),
        },
      ],
    },
  ],
};
